import {HTTP} from '../util/http.js'

class LikeModel extends HTTP {
  like(behaviour,index) {
    let url = behaviour == 'like'?'like':'dislike'
    this.request({
      url: 'users/'+url,
      method: 'POST',
      data: {
        index: index
      }
    })
  }
  getLikeList(sCallback){
    this.request({
      url: 'users/get_like_list',
      success: (res) => {
        sCallback(res)
      }
    })
  }
}

export {LikeModel}